<?php

header("Access-Control-Allow-Origin: *");
header('Content-Type:application/json;charset=UTF-8');

$act = isset($_GET['act']) ? $_GET['act'] : '';
$type = isset($_GET['type']) ? $_GET['type'] : 'image';
//phpinfo();
if ($act == 'upload') {
    if ($type == 'media') {
        echo json_encode([
            'code' => 1,
            'data' => [
                'url' => 'https://nexnovoupload.s3.cn-north-1.amazonaws.com.cn/uat/bbs/videos/uat_9188007915426938881639100779197hXgva.mp4'
            ],
            'msg' => 'xxxxx'
        ]);
    } elseif ($type == 'file') {
        echo json_encode([
            'code' => 1,
            'data' => [
                'url' => 'https://nexnovoupload.s3.cn-north-1.amazonaws.com.cn/uat/bbs/videos/uat_9188007915426938881639100779197hXgva.mp4'
            ],
            'msg' => 'xxxxx'
        ]);
    } else { //if ($type == 'image')
        echo json_encode([
            'code' => 1,
            'data' => [
                'url' => 'https://gitee.com/static/images/logo-black.svg?t=158106664'
            ],
            'msg' => 'xxxxx'
        ]);
    }
    exit;
}
